﻿using JTTD.Common.Enum;
using System;
using System.ComponentModel.DataAnnotations;

namespace JTTD.Domain.Dtos.ShopActivity.Request
{
    /// <summary>
    /// 设置店铺活动
    /// </summary>
    public  class SetShopActivityRequestDto
    {
        /// <summary>
        /// 活动编号
        /// </summary>
        [MaxLength(50,ErrorMessage ="活动编号不能超过50个字符")]
        public string No { get; set; }
        /// <summary>
        /// 活动名称
        /// </summary>
        [Required(ErrorMessage ="活动名称不能为空")]
        [MaxLength(50,ErrorMessage ="活动名称不能超过25个汉字")]
        public string Name { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [Required(ErrorMessage ="开始时间不能空")]
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [Required(ErrorMessage = "结束时间不能空")]
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 活动类型：0满减活动，1代金券活动
        /// </summary>
        public ShopActivityTypeEnum Type { get; set; }
        /// <summary>
        /// 优惠条件达成金额
        /// </summary>
        [Range(0,double.MaxValue,ErrorMessage ="优惠条件达成金额不能小于0")]
        public decimal FullAmount { get; set; }
        /// <summary>
        /// 满减金额
        /// </summary>
        [Range(0, double.MaxValue, ErrorMessage = "满减金额不能小于0")]
        public decimal CouponAmount { get; set; }
        /// <summary>
        /// 代金券金额
        /// </summary>
        [Range(0, double.MaxValue, ErrorMessage = "代金券金额不能小于0")]
        public decimal CashCouponAmount { get; set; }
        /// <summary>
        /// 活动内容
        /// </summary>
        [Required(ErrorMessage = "活动内容不能为空")]
        [MaxLength(500, ErrorMessage = "活动内容不能超过250个汉字")]
        public string Remark { get; set; }

        /// <summary>
        /// 活动图片
        /// </summary>
        [Required(ErrorMessage = "请上传活动图片")]
        [MaxLength(200, ErrorMessage = "活动图片链接不能超过200个字符")]
        public string Photo { get; set; }
    }
}
